string=input("请随便输入点东西(英文，数字，空格都行):")
length=len(string)
count_num=0
count_eng=0
count_spa=0
count_oth=0
for i in range(0,length):
    temp=string[i:i+1]
    if(temp.isalpha()):
        count_eng+=1
    elif(temp.isdigit()):
        count_num+=1
    elif(temp.isspace()):
        count_spa+=1
    else:
        count_oth+=1
print("字母个数为："+str(count_eng))
print("数字个数为："+str(count_num))
print("空格个数为："+str(count_spa))
print("其他字符个数为："+str(count_oth))

    
